# Copyright (C) 2004-2007, 2009  Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2001, 2002  Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.

# $Id: Makefile.in,v 1.22 2009-02-12 23:47:56 tbox Exp $

srcdir =	@srcdir@
VPATH =		@srcdir@
top_srcdir =	@top_srcdir@

@BIND9_MAKE_RULES@

@BIND9_VERSION@

MANOBJS = Bv9ARM.html

PDFOBJS = Bv9ARM.pdf

doc man:: ${MANOBJS} ${PDFOBJS}

clean::
	rm -f Bv9ARM.aux Bv9ARM.brf Bv9ARM.glo Bv9ARM.idx Bv9ARM.toc
	rm -f Bv9ARM.log Bv9ARM.out Bv9ARM.tex Bv9ARM.tex.tmp

docclean manclean maintainer-clean:: clean
	rm -f *.html ${PDFOBJS}

docclean manclean maintainer-clean distclean::
	rm -f releaseinfo.xml

Bv9ARM.html: Bv9ARM-book.xml releaseinfo.xml
	expand Bv9ARM-book.xml | \
	${XSLTPROC} --stringparam root.filename Bv9ARM \
		${top_srcdir}/doc/xsl/isc-docbook-chunk.xsl -

Bv9ARM-all.html: Bv9ARM-book.xml releaseinfo.xml
	expand Bv9ARM-book.xml | \
	${XSLTPROC} -o Bv9ARM-all.html ../xsl/isc-docbook-html.xsl -

Bv9ARM.tex: Bv9ARM-book.xml releaseinfo.xml
	expand Bv9ARM-book.xml | \
	${XSLTPROC} ${top_srcdir}/doc/xsl/pre-latex.xsl - | \
	${XSLTPROC} ${top_srcdir}/doc/xsl/isc-docbook-latex.xsl - | \
	@PERL@ latex-fixup.pl >$@.tmp 
	if test -s $@.tmp; then mv $@.tmp $@; else rm -f $@.tmp; exit 1; fi

Bv9ARM.dvi: Bv9ARM.tex releaseinfo.xml
	rm -f Bv9ARM-book.aux Bv9ARM-book.dvi Bv9ARM-book.log
	${LATEX} '\batchmode\input Bv9ARM.tex' || (rm -f $@ ; exit 1)
	${LATEX} '\batchmode\input Bv9ARM.tex' || (rm -f $@ ; exit 1)
	${LATEX} '\batchmode\input Bv9ARM.tex' || (rm -f $@ ; exit 1)

Bv9ARM.pdf: Bv9ARM.tex releaseinfo.xml
	rm -f Bv9ARM-book.aux Bv9ARM-book.pdf Bv9ARM-book.log
	${PDFLATEX} '\batchmode\input Bv9ARM.tex' || (rm -f $@ ; exit 1)
	${PDFLATEX} '\batchmode\input Bv9ARM.tex' || (rm -f $@ ; exit 1)
	${PDFLATEX} '\batchmode\input Bv9ARM.tex' || (rm -f $@ ; exit 1)

releaseinfo.xml:
	echo >$@ '<releaseinfo>BIND Version ${VERSION}</releaseinfo>'
